package pwd.allen.construct.decorator;

import pwd.allen.construct.common.MysqlConnection;

/**
 * @author 门那粒沙
 * @create 2021-05-20 20:24
 **/
public class Main {
    public static void main(String[] args) {
        // 不需要实现MysqlConnection的子类就能在MyConnection基础上添加新功能
        MyConnectionDecorator decorator = new MyConnectionDecorator(new MysqlConnection());
        decorator.pingConnection("127.0.0.1", 2222, "test");
    }
}
